<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <style type="text/css">
			input{
				height:30px;
				width:200px;
				color:#ccc;
			}
			button{
				width:60px;
				height:30px;
			}
        </style>
        <script type="text/javascript">
        	window.onload = function(){
        		function $(id){ return document.getElementById(id) }

        		$("txt").onfocus = function(){
        			if($("txt").value =="请输入...."){
        				$("txt").value =""
        				$("txt").style.color = "#333"
        			}
        		}
        		$("txt").onblur = function(){
        			if($("txt").value ==""){
        				$("txt").value ="请输入...."
        				$("txt").style.color = "#ccc"
        			}
        		}

        	}
        </script>
    </head>
    <body>
    	<input type="text" value="请输入...." id="txt" /><button>按钮</button>
    </body>
</html>